package com.jshan.base.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.time.LocalDateTime;
import io.swagger.v3.oas.annotations.media.Schema;

@Data
@TableName("sys_user")
@Schema(description = "系统用户实体")
public class SysUser {
    @TableId(type = IdType.AUTO)
    @Schema(description = "用户ID")
    private Long id;
    @Schema(description = "用户名")
    private String username;
    @Schema(description = "密码")
    private String password;
    @Schema(description = "真实姓名")
    private String realName;
    @Schema(description = "邮箱")
    private String email;
    @Schema(description = "手机号")
    private String phone;
    @Schema(description = "头像URL")
    private String avatar;
    @Schema(description = "状态(0禁用 1正常)")
    private Integer status;
    @Schema(description = "创建时间")
    private LocalDateTime createTime;
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;
    @TableField(exist = false)
    @Schema(description = "是否已分配(仅用于前端展示)")
    private transient Boolean assigned;
    @Schema(description = "昵称")
    private String nickname;
}
